<ion-header>
  <div class="uh ubb bor_b bc-bg" data-control="HEADER" id="Header">
    <div class="ub bc-head">
      <div class="nav-btn" id="nav-left" (click)="navCtrl.pop()">
        <div class="ub-img1 back_btn_img"></div>
      </div>
      <h1 class="ut ub-f1 ulev-3 ut-s color_black" style="text-align: center;" tabindex="0">我的挑战</h1>
      <div class="ub ub-ac nav-btn" id="nav-right" (click)="newChangell()">
        <div class="ub-img" style="background-image: url(assets/imgs/img/jiaguanzhu_red.png);width: 1em;height: 1em;"></div>
        &nbsp;
        <div class="color_red">
          挑战
        </div>
        &nbsp;
      </div>
    </div>
    <div class="ub color666 mar_t5 bc-head">
      <div class="ub ub-ac ub-pc ub-f1 umh5 " [ngClass]="{'bor_tex_red': (bor_tex_red==1) }" (click)="qiehuan(1)">
        我发起的
      </div>
      <div class="ub ub-ac ub-pc ub-f1 umh5 " [ngClass]="{'bor_tex_red': (bor_tex_red==2)}" (click)="qiehuan(2)">
        我参与的
      </div>
      <div class="ub ub-ac ub-pc umh4 pad_right7" id="btn4">
        <span id="type3" (click)="qiehuan(3)">全部</span>
        <div (click)="qiehuan(3)" class="ub-img icon1"></div>
        <div (click)="closePop_n()" id="pop3" class="ub ub-ver uba bc-border bc-head color_black">
          <div class="ub ub-f1 ub-ac ub-pc" (click)="closePop1_n(1)">
            全部
          </div>
          <div class="ub ub-f1 ub-ac ub-pc" (click)="closePop1_n(2)">
            健身
          </div>
          <div class="ub ub-f1 ub-ac ub-pc" (click)="closePop1_n(3)">
            健脑
          </div>
          <div class="ub ub-f1 ub-ac ub-pc" (click)="closePop1_n(4)">
            健财
          </div>
          <div class="ub ub-f1 ub-ac ub-pc" (click)="closePop1_n(5)">
            健心
          </div>
        </div>
      </div>

    </div>
  </div>
</ion-header>

<ion-content>
  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="下拉刷新..." refreshingSpinner="circles" refreshingText="请稍等...">
    </ion-refresher-content>
  </ion-refresher>
  <div class="bc-head ub ub-ver" id="content">
    <div class="scrollbox">
      <!-- 我参与的 -->
      <div class="pad_left7 pad_right7 maxW bor bc-head" id="btn1_y" [hidden]=" (bor_tex_red==2)">
        <div *ngFor="let item of btn1_yList; let i=index">
          <div class="ub ub-ac umh5 pad_left7 bc-head ">
            <div *ngIf="i>0" class="ub ub-ver ub-ac umar-r" style="height:4em;">
              <div class="ub-f1 ubr bor_red"></div>
              <div class="ub-img" style="background-image: url(assets/imgs/img/time_red.png);width: 1.5em;height: 1.5em;"></div>
              <div class="ub-f1 ubr bor_red"></div>
            </div>
            <div *ngIf="i==0" class="ub ub-ver ub-ac umar-r" style="height: 2.75em;">
              <div class="ub-img" style="background-image: url(assets/imgs/img/time_red.png);width: 1.5em;height: 1.5em;"></div>
              <div class="ub-f1 ubr bor_red"></div>
            </div>
            <div class="ub-f1 " [ngClass]="{'filsttfont': i==0}"> {{item.CreateDate*1000 | date:"yyyy-MM-dd"}} </div>
            <!-- item.State==10 && item.Pattern!=10 && item.joinlist.length <2 -->
            <div *ngIf="IsDate(item)">
              推荐转换成单人模式
              <div class="yaoqing_btn color-red uba umar-l" (click)="zhuanhuan_one(item)">确定</div>
            </div>
          </div>
          <div class="ub-img1  tiaozhan_wh" style="background-image:url({{bcimg}})" (click)="openD_t_my(item)">
            <div class="ub ub-ac ub-pc ub-ver  ub-con color_white" style="background-color: rgba(0,0,0,0.25);">
              <div class="ub-img ub ub-ac ub-pc fontsize8" style="background-image: url(assets/imgs/img/lable.png);width:5em;height: 2em;position: absolute;top: 0em;z-index: 666;right: 0.7em;">
                {{ item.State | dataWallet:'State' }} </div>
              <div class="ub ub-ac">
                <div class="ub-f1 width_hr ubb"></div>
                <img src="{{item.Pattern | dataWallet:'PatternIMg'}}" style="width: 2.5em;height: 2.5em;margin: 0.3em;" />
                <div class="ub-f1 width_hr ubb"></div>
              </div>
              <div>
                <h2>{{item.Title}}</h2>
              </div>
              <div class="ub fontsize8 umar-t">
                <div>{{item.Pattern | dataWallet:"Pattern" }} </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 我发起的挑战 -->
      <div class="pad_left7 pad_right7 maxW bor bc-head" id="btn2_y" [hidden]="(bor_tex_red==1)">
        <div *ngFor="let item of btn2_yList; let i=index">
          <div class="ub ub-ac umh5 pad_left7 bc-head  ">
            <div *ngIf="i>0" class="ub ub-ver ub-ac umar-r" style="height:4em;">
              <div class="ub-f1 ubr bor_red"></div>
              <div class="ub-img" style="background-image: url(assets/imgs/img/time_red.png);width: 1.5em;height: 1.5em;"></div>
              <div class="ub-f1 ubr bor_red"></div>
            </div>
            <div *ngIf="i==0" class="ub ub-ver ub-ac umar-r" style="height: 2.75em;">
              <div class="ub-img" style="background-image: url(assets/imgs/img/time_red.png);width: 1.5em;height: 1.5em;"></div>
              <div class="ub-f1 ubr bor_red"></div>
            </div>
            <div class="ub-f1" >{{item.CreateDate*1000 | date:"yyyy-MM-dd"}}</div>
          </div>
          <div class="ub-img1  tiaozhan_wh" style="background-image:url({{bcimg}})" (click)="openD_t_my(item)">
            <div class="ub ub-ac ub-pc ub-ver  ub-con color_white" style="background-color: rgba(0,0,0,0.25);">
              <div class="ub-img ub ub-ac ub-pc fontsize8" style="background-image: url(assets/imgs/img/lable.png);width:5em;height: 2em;position: absolute;top: 0em;z-index: 666;right: 0.7em;">
                {{ item.State | dataWallet:'State' }} </div>
              <div class="ub ub-ac">
                <div class="ub-f1 width_hr ubb"></div>
                <img src="{{littleimg}}" style="width: 2.5em;height: 2.5em;margin: 0.3em;" />
                <div class="ub-f1 width_hr ubb"></div>
              </div>
              <div>
                <h2>{{item.Title}}</h2>
              </div>
              <div class="ub fontsize8 umar-t">
                <div>{{item.Pattern | dataWallet:"Pattern" }} </div>
              </div>
            </div>
          </div>

        </div>
      </div>
    </div>
  </div>
  <div [hidden]="doRefreshData.forbidFinite" class="ub ub-pc ub-ac umh5" style="width:100%;">
    <div class="line"></div>
    <div class=" tx-c"> 到底了 </div>
    <div class="line"></div>
  </div>
  <ion-infinite-scroll *ngIf="doRefreshData.forbidFinite" (ionInfinite)="doInfinite($event)">
    <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="加载更多......">
    </ion-infinite-scroll-content>
  </ion-infinite-scroll>
</ion-content>
